<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>hangge.com</title>
    <style>
        html, body, div, span, button {
            margin: 0;
            padding: 0;
            border: 0;
        }

        button {
            width: 120px;
            height: 30px;
            color: #FFFFFF;
            font-family: "微软雅黑";
            font-size: 14px;
            background: #28B995;
        }

        #mask {
            width: 100vw;
            height: 100vh;
            position: fixed;
            top: 0;
            left: 0;
            background: #000000;
            opacity: 0.5;
            display: none;
        }
    </style>
</head>
<body>
<button onclick="document.getElementById('mask').style.display='inline'">点击显示遮罩</button>
<div id="mask" onclick="document.getElementById('mask').style.display='none'"/></div>
</body>
</html>